﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;

namespace PlutoStudio.Net
{
    public interface INetClient
    {
        event ReceivedEventHandler Received;
        event ConnectedEventHandler Connected;
        event SendedEventHandler Sended;
        event ClosedEventHandler Closed;
        event ErrorEventHandler Error;

        void BeginReceive();

        void Send(Messages.IMessage message);

        void Send(EndPoint remoteEP, Messages.IMessage message);

        void Close();

        void Connect();

        void Connect(System.Net.IPEndPoint endPoint);

        EndPoint RemoteEndPoint { get; }

        EndPoint LocalEndPoint { get; }
    }
}
